<template>
  <div class="foot_right">
    <p>同类热卖</p>
    <div>
      <router-link :to="`in_shop?tid=${inshopShow[0].sid}`">
        <img class="img2" :src="inshopShow[0].img" />
        <div class="hover_1">
          <p>{{ inshopShow[0].title }}</p>
          <p>
            <router-link :to="`/in_shop?tid=${inshopShow[0].sid}`">{{
              inshopShow[0].inShop
            }}</router-link>
          </p>
          <div>
            <span>¥{{ inshopShow[0].price }}</span
            ><span>100%好评</span>
          </div>
        </div>
      </router-link>
    </div>
    <div>
      <router-link :to="`in_shop?tid=${inshopShow[1].sid}`">
        <img class="img2" :src="inshopShow[1].img" />
        <div class="hover_1">
          <p>{{ inshopShow[1].title }}</p>
          <p>
            <router-link :to="`/in_shop?tid=${inshopShow[1].sid}`">{{
              inshopShow[1].inShop
            }}</router-link>
          </p>
          <div>
            <span>¥{{ inshopShow[1].price }}</span
            ><span>100%好评</span>
          </div>
        </div>
      </router-link>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      inshopShow: [{ sid: "" }, { sid: "" }],
    };
  },
  mounted() {
    this.axios.get("/in_shop_show").then((res) => {
      this.inshopShow = res.data;
      // console.log(this.inshopShow)
    });
  },
};
</script>
<style scoped>
img:hover {
  opacity: 0.8;
}
.foot_right img {
  width: 320px;
  height: 200px;
}
.foot_right {
  width: 320px;
  float: left;
  margin-left: 20px;
}
.foot_right > p:first-child {
  font-size: 24px;
  margin-top: 20px;
}
.foot_right > div {
  margin-top: 20px;
}
.hover_1 {
  position: relative;
  margin: -20px auto 0;
  padding: 10px 20px 0;
  width: 80%;
  height: 100px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
  line-height: 30px;
  transition-duration: 0.3s;
}
.hover_1 > p:first-child {
  font-size: 14px;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 220px;
}
.hover_1 > p:nth-child(2) {
  font-size: 12px;
}
.hover_1 > div:last-child > span:first-child {
  color: #dc3545;
  font-size: 18px;
  font-weight: bold;
}
.hover_1 > div:last-child > span:last-child {
  font-size: 12px;
  margin-left: 100px;
}
.hover_1:hover {
  transform: translateY(-8px);
}
</style>